package com.paas.form.core.element.control.impl.searchItem;

import com.paas.form.core.element.control.FormItem;
import com.paas.form.core.element.field.FieLdsModel;
import com.paas.form.core.element.jsContent.ScriptContent;
import lombok.Data;


@Data
public class ElInputNumber implements FormItem {
    private FieLdsModel field;
    private String htmlType;
    public static final String COM_SELECT ="<com-select v-model=\"${formObject}.${field.vModel}\" placeholder=\"请选择${field.config.label}\" clearable\n" +
            "                class=\"item\" :multiple=\"${field.multiple}\" />";


    public static final String EL_INPUT_NUMBER_TABLE ="<el-input-number v-model=\"scope.row[${field.vModel}]\"\n" +
            "                        :placeholder=\"item.placeholder\" :min=\"item.min\" :max=\"item.max\"\n" +
            "                        :step=\"item.step\" :precision=\"item.precision\"\n" +
            "                        :controls-position=\"item['controls-position']\" :disabled=\"item.disabled\"\n" +
            "                        style=\"width:100%\" />";

    public ElInputNumber(FieLdsModel field, String htmlType){
        this.field = field;
        this.htmlType = htmlType;

    }


    @Override
    public String makeVue() {
        return COM_SELECT;
    }

    @Override
    public ScriptContent makeJs() {
        return null;
    }
}
